package com.pagoda.nerp.trade.common.exception;

import com.pagoda.nerp.trade.common.enums.ErrorCodeMappingEnums;

/**
 * Created by Jungle on 2016/12/21.
 */
public class BaseException extends RuntimeException {

    protected ErrorCodeMappingEnums errorCodeMappingEnums;

    public BaseException(String message) {
        super(message);
    }

    public BaseException(ErrorCodeMappingEnums errorCodeMappingEnums) {
        super(errorCodeMappingEnums.getErrorMsg());
        this.errorCodeMappingEnums = errorCodeMappingEnums;
    }

    public BaseException(String message, Throwable cause) {
        super(message, cause);
    }

    public ErrorCodeMappingEnums getErrorCodeMappingEnums() {
        return errorCodeMappingEnums;
    }

    public void setErrorCodeMappingEnums(ErrorCodeMappingEnums errorCodeMappingEnums) {
        this.errorCodeMappingEnums = errorCodeMappingEnums;
    }

}
